<%@page contentType="text/html" pageEncoding="UTF-8" %>
<!DOCTYPE>
<html>
<head>
<title>
	聊天室-登录
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<style type="text/css"> 
form{
	width: 300px;
    height: 400px;
    margin: 0 auto;
	margin-top: 200px;
}
.form1_content {
    width: 300px;
    height: 400px;
	font-size:14px;
	background-color:#efefef;	
	background:url(images/index.jpg);
	position: relative;
	
} 
.input{
 	width: 200px;
    height: 30px;
    margin: 0 auto;
	margin-top: 20px;
}
.btn_lg {
	border:#436E9B thin 0px;
	width:56px;
	height:20px;
	margin-left: 50px;
	margin-top: 20px;
}
.bt_gotoReg{
	border:#436E9B thin 0px;
	margin-left: 65;
	height:20px;	
	margin-top: 20px;
}
.inputArea{
    width: 300px;
    height: 300px;
    position: absolute;
    top: 50px;
}
</style> 
<script>
function check(){
	if(form1.username.value==""){
		alert("用户名不能为空!");
		form1.username.focus();
		return false;
	}		
	if(form1.username.value.length >= 6){
		alert("用户名长度不能大于6!");
		form1.username.focus();
		return false;
	}				
	return true;
}
</script>
</head>
<body>
<br>
<form name="form1" method="post" action="Dispatcher?action=LoginAction" onSubmit="return check()">
    <div class="form1_content">
    <div class="inputArea">
		<div class="input">昵称：
<input type="text" name="username"></div>
		<div class="input">密码：
<input type="password" name="pwd"></div>
        <div><input name="Submit" type="submit" class="btn_lg" value="进 入">
        <input class="bt_gotoReg" type="button" value="前往注册" onclick="window.location.href = 'register.jsp';"></div>
        </div>
</div>
</form>
</body>
</html>
